<%@ page language="java" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
${aier_doctype}
<html <s:property value="aier-html-xmlns" escape="false"/>>
<head>
<meta http-equiv="Content-Type" content="${aier_content_type}" />
<meta name="keywords" content="${aier_keyworks}" />
<meta name="description" content="${aier_description}" />
<title>${aier_title}</title>
<link rel="stylesheet" href="${aier_css_url}${aier_jqui_css}ui.css" />
<link rel="Stylesheet" href="${aier_css_url}jq/jq.css" />
<link rel="stylesheet" href="${aier_css_url}jp/msg.css" />
<link rel="stylesheet" href="${aier_css_url}social/module/jq-msg.css" />
<link rel="stylesheet" href="${aier_css_url}social/module/reset.css" />
<link rel="stylesheet" href="${aier_css_url}social/school/common.css" />
<link rel="stylesheet" href="${aier_css_url}social/school/smanage.css" />


<script type="text/javascript" src="${aier_js_url}j.js"></script>
<script type="text/javascript" src="${aier_js_url}b.js"></script>
<script type="text/javascript" src="${aier_js_url}jp/hh/ui.js"></script>
<script type="text/javascript" src="${aier_js_url}jp/msg.js"></script>
<script type="text/javascript" src="${aier_js_url}97/WdatePicker.js"></script>
<script type="text/javascript" src="${aier_js_url}jq/cn.js"></script>
<script type="text/javascript" src="${aier_js_url}jq/jq.js"></script>
<script type="text/javascript" src="${aier_js_url}lib/block.js"></script>
<script type="text/javascript" src="${aier_js_url}lib/afu.js"></script>
</head>
<!-- 学校快速入驻页面 -->
<body> 
	<!-- 顶栏 -->
	<s:action name="userhomecomm_homeHead" namespace="/user"
		executeResult="true"></s:action>

	<!-- 正文 -->
	<div id="hfContent" class="ar-content">
		<div class="content-main">
			<!-- 学校名称栏 -->
			<s:action name="scomm_schoolMTitle" namespace="/school" executeResult="true"></s:action>
			<div class="main-content wrap-bg clearfix">
				<!-- 左侧栏 -->
				<s:action name="scomm_schoolMLeft" namespace="/school" executeResult="true"></s:action>
				<!-- 右侧内容 -->
				<div class="ae-right">
					<div class="right-main">
						<div class="right-main-top">
							<div class="binfo-title">
								<h3>快速建号</h3>
							</div>
							<div class="right-line">
							</div>
						</div>
						<div class="right-main-c">
							<div class="main-c-dtem"><a id="downBlank" href="javascript:;"
								class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only fr"
								role="button" aria-disabled="false"><span
								class="ui-button-text">下载模板</span> </a></div>
							<div class="main-c-sqc">
								<input style="width:100px;height:35px;" class="sqc-file" type="file" id="file" name="file" onchange="txt_path.value=this.value"> 
								<input id="txt_path" type="text" class="PY-input" readonly="readonly"> 
								<label style="cursor: default;" for="file">
								<a id="b_selfile" href="javascript:;"
								class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only fr"
								role="button" aria-disabled="false"><span
								class="ui-button-text">选择文件</span> </a>
								</label> &nbsp;&nbsp;&nbsp;&nbsp;
								
								
								
								<a onclick="openDialog();" href="javascript:;"
								class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only fr"
								role="button" aria-disabled="false"><span
								class="ui-button-text">上传</span> </a>
								
								
							</div>
							
							<div style="margin-top: 100px;">快速入驻说明：</div>
							<div style="margin-top: 10px;font-size: 13px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;快速入驻可实现批量添加教师、学生和家长的信息，同步实现新手卡的发放工作，如果需要单个添加，可在班级管理的成员添加中进行。</div>
							<div style="margin-top: 10px;font-size: 13px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;快速入驻时如果导入相同学生名字会自动覆盖学生原信息并新增或修改家长信息，可用来修改学生的家长信息。</div>
							
							
						</div>
					</div>
				</div>
			    <div id="messageConfirm" title="友情提醒">
			        <div>
			            如果上传的表格中的学生信息与现有班级学生重名，会覆盖原学生信息，并新增或修改相关家长信息，确定继续上传吗？
			        </div>
			    </div>
			</div>

		</div>
		<!-- footer copyright -->
		<s:action name="userhomecomm_homeFooter" namespace="/user" executeResult="true"></s:action>
		<!-- /footer copyright -->
	</div>
</body>
<script type="text/javascript">

$('#messageConfirm').dialog({
    //背景变暗
    modal : true,
    autoOpen : false,
    show : "fade",
    hide : "fade",
    width : "400",
    buttons : {
        "确定" : function() {
        	$(this).dialog("close");
        	setTimeout("loadExcle()",300);
        },
        "取消" : function() {
            $(this).dialog("close");
        }
    }
});
        
//上传文件
function openDialog() {
	$('#messageConfirm').dialog("open");
}
//上传文件
function loadExcle() {
    try {
        $.ajaxFileUpload({
                    url : "${aier_url}${aier_urijs}schoolqcaccount_uploadExcelModule${aier_suffix}?sid=${sid}",
                    secureuri : false,
                    fileElementId : 'file',
                    dataType : 'json',
                    success : function(data, status) {

                        if (1 == data.s) {
                            alert("快速创建成功");
                        } else {
                            alert("快速创建失败:"+data.error_info);
                        }
                        $("#txt_path").val("");
                    },
                    error : function(data, status, e) {
                        alert("服务器连接超时2:"+e.toString());
                    }
                });
    } catch (e) {
        alert("服务器连接超时1:"+e.toString());
    }
}

//下载模版
$('#downBlank').click(function() {
	location.href = "${data_url}quick_account.xls";
});
</script>
</html>